<?php
App::uses('AppModel', 'Model');
/**
 * TBRESPONSAVELTECNICOLIBEXAME Model
 *
 * @property CBO $CBO
 * @property UF $UF
 * @property Responsavel_Instituicao $Responsavel_Instituicao
 */
class ResponsavelTecnicoLibExame extends AppModel {

/**
 * Use table
 *
 * @var mixed False or table name
 */
	public $useTable = 'TB_RESPONSAVEL_TECNICO_LIB_EXAME';

/**
 * Primary key field
 *
 * @var string
 */
	public $primaryKey = 'NU_CONSELHO';

/**
 * Validation rules
 *
 * @var array
 */
	public $validate = array(
		'NO_RESPONSAVEL' => array(
			'alphanumeric' => array(
				'rule' => array('alphanumeric'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'NU_CONSELHO' => array(
			'numeric' => array(
				'rule' => array('numeric'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'UF_CONSELHO' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'CD_CBO' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'SG_CONSELHO' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed

/**
 * hasOne associations
 *
 * @var array
 */
	public $hasOne = array(
		'CBO' => array(
			'className' => 'CBO',
			'foreignKey' => 'CD_CBO',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'UF' => array(
			'className' => 'UF',
			'foreignKey' => 'CD_UF',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

/**
 * belongsTo associations
 *
 * @var array

	public $belongsTo = array(
		'ResponsavelInstituicao' => array(
			'className' => 'ResponsavelInstituicao',
			'foreignKey' => 'CO_RESPONSAVEL',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	); */
}
